home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Apple Macintosh Developer Technical Support
- **
- ** Header for SimpleQT functions using SimpleApp framework.
- **
- ** by Mark Cookson, Apple Developer Technical Support
- **
- ** File: SimpleApp_Sound.h
- **
- ** Copyright ©1996 Apple Computer, Inc.
- ** All rights reserved.
- **
- ** You may incorporate this sample code into your applications without
- ** restriction, though the sample code has been provided "AS IS" and the
- ** responsibility for its operation is 100% yours. However, what you are
- ** not permitted to do is to redistribute the source as "Apple Sample
- ** Code" after having made changes. If you're going to re-distribute the
- ** source, we require that you make it clear in the source that the code
- ** was descended from Apple Sample Code, but that you've made changes.
- */
-
- #include <Windows.h>
-
- #include "SimpleApp.h"
- #include "DBFF.h"
-
- #define oneBuffer (1)
- #define tenBuffers (10)
- #define soundPlaying (!ASoundIsDone (mySoundInfo) && !paused)
- #define qtStyle 0
- #define cdStyle 1
- #define kScrollMinValue 1
-
- /* Globals */
- ControlHandle startButton = nil,
- stopButton = nil,
- resumeButton = nil,
- scrollBar = nil,
- checkBox = nil;
- Boolean CDStyle = false, /* false means QuickTime style scrolling */
- gPlayBackwards = false, /* should we play backwards? */
- paused = false, /* are we currently paused? */
- stopped = false, /* are we currently stopped? */
- gDone = false;
- SoundInfoPtr mySoundInfo = nil;
- GrafPtr gTheWindow = nil;
- Str255 gOldWindowTitle;
-
- /* Function declarations */
- pascal void DoScroll (ControlHandle control, short part);
- pascal void MyScrollAction (ControlHandle control, short part);
- short DoPlay (void);
- short DoPause (void);
- void MyIdleProc (EventRecord *evt);
- OSErr DoStop (void);
- pascal short DoPostGroupHit (long modifiers,
- ControlRef theControl,
- ButtonItemRecHandle brh,
- short item);
- short DoPlayBackwards (long modifiers);
- void main (void);
- void EnableControl (ControlRef cr);
- void DisableControl (ControlRef cr);
-